lst1=[]
index = 0
for i in range(30):
    lst1.append(i+1)
for i in range(10):
    index = (index + 7) % len(lst1)
    print(lst1[index])
    lst1.remove(lst1[index])
